package com.atung.parking.enums;

import lombok.Getter;

/**
 * @author Administrator
 */

@Getter
public enum PackageSourceType {
    CUSTOMER_ADD("客户新增"),
    PLATFORM_ADD("平台新增");
    private final String description;

    PackageSourceType(String description) {
        this.description = description;
    }

    public static String getDescriptionByName(String name) {
        for (PackageSourceType type : values()) {
            if (type.name().equals(name)) {
                return type.getDescription();
            }
        }
        throw new IllegalArgumentException("Unknown description: " + name);
    }
}
